<?php

/**
 * ObraSocial form base class.
 *
 * @package    isaac
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseObraSocialForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'            => new sfWidgetFormInputHidden(),
      'nombre'        => new sfWidgetFormInput(),
      'nombre_corto'  => new sfWidgetFormInput(),
      'telefono'      => new sfWidgetFormInput(),
      'direccion'     => new sfWidgetFormInput(),
      'localidad'     => new sfWidgetFormInput(),
      'cod_postal'    => new sfWidgetFormInput(),
      'provincia'     => new sfWidgetFormInput(),
      'porc_patronal' => new sfWidgetFormInput(),
      'porc_personal' => new sfWidgetFormInput(),
      'created_at'    => new sfWidgetFormDateTime(),
      'updated_at'    => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'            => new sfValidatorPropelChoice(array('model' => 'ObraSocial', 'column' => 'id', 'required' => false)),
      'nombre'        => new sfValidatorString(array('max_length' => 48)),
      'nombre_corto'  => new sfValidatorString(array('max_length' => 48, 'required' => false)),
      'telefono'      => new sfValidatorString(array('max_length' => 64, 'required' => false)),
      'direccion'     => new sfValidatorString(array('max_length' => 64, 'required' => false)),
      'localidad'     => new sfValidatorString(array('max_length' => 24, 'required' => false)),
      'cod_postal'    => new sfValidatorString(array('max_length' => 15, 'required' => false)),
      'provincia'     => new sfValidatorString(array('max_length' => 24, 'required' => false)),
      'porc_patronal' => new sfValidatorNumber(array('required' => false)),
      'porc_personal' => new sfValidatorNumber(array('required' => false)),
      'created_at'    => new sfValidatorDateTime(array('required' => false)),
      'updated_at'    => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('obra_social[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'ObraSocial';
  }


}
